<?php
include "../database.php";
//Nastavljanje aktivnega pokra
if(isset($_GET['story_id'])){
    $story = $_GET['story_id'];
    //Nastavljamo aktivnost pokra
    if(isset($_GET['set'])){
        $set = $_GET['set'];
        //"UPDATE story SET poker_active = '$set' WHERE story_id = $story";
        $query = "UPDATE story SET poker_active = '$set' WHERE story_id = '$story'";
        echo $query;
        executeQuery($query);

    }
    //Preberemo, če je aktiven poker na zgodbi
    else{
        $query = "SELECT poker_active FROM story WHERE story_id = '$story'";
        if(mysql_fetch_array(executeQuery($query))[0]==1)
            echo "1";
        else echo "0";
    }
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
